package com.maochd.platform.controller;

import com.maochd.platform.domain.R;
import com.maochd.platform.domain.TcWebHooks;
import com.maochd.platform.service.MsgService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping({"/msg"})
public class MsgController {

    @Resource
    private MsgService msgService;

    @PostMapping({"/teamcity/accept"})
    public R<?> teamcityAccept(@RequestBody TcWebHooks webHooks) {
        msgService.teamcityAccept(webHooks);
        return R.ok();
    }
}
